import { Component, OnInit, Inject } from "@angular/core";
import { ToastrService, NGW_TOASTR_SERVICE } from "../../foundation/toastr/ToastrService";

@Component({
  selector: 'app-demo-toastr',
  templateUrl: './toastr.component.html',
  styleUrls: ['./toastr.component.css']
})
export class ToastrComponent implements OnInit {

  constructor(
    @Inject(NGW_TOASTR_SERVICE) private toastrService: ToastrService) {}

  ngOnInit() {
  }

  show() {
    this.toastrService.show('默认提示');
  }
  success() {
    this.toastrService.success('成功提示');
  }
  info() {
    this.toastrService.info('信息提示');
  }
  warning() {
    this.toastrService.warning('警告提示');
  }
  error() {
    this.toastrService.error('错误提示');
  }
  clear() {
    this.toastrService.clear();
  }
}
